<?php 

      $listid		= gpc_getStringArray("listid");
      $liststatus	= gpc_getStringArray("liststatus");
      $listDep   	= gpc_getStringArray("listDep");
	  $listorder	= gpc_getStringArray("listorder");
	  $listprice	= gpc_getStringArray("listprice");
	  $listtypical  = gpc_getStringArray("typical");
      $listnew      = gpc_getStringArray("new");
      $listhot      = gpc_getStringArray("hot");
      $id			= gpc_getIntPost("id");
		
 
      $countlist = count($listid);
      
      for ($i = 0; $i < $countlist; $i ++)
      {     	
      	$sql_update = "UPDATE  tblproduct SET 
      				  iStatus	 = '$liststatus[$i]',
                      iDepository= '$listDep[$i]',
                      iNew       = '$listnew[$i]',
                      iHot       = '$listhot[$i]',
					  iOrder     = '$listorder[$i]',
					  cPrice	 = '$listprice[$i]',
                      iTypical   = '$listtypical[$i]'
      				  WHERE  iId = $listid[$i]";
      
      	$dbsql->query($sql_update);
     }
     
     

      $cActions = " Update Status Product";
	  Insert_Tracking($cActions);
	
	  
      $msg = "Update Product Status Success !";
      page_transfer($msg,$pagetr);

      exit();

?>
